Page({
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.data.id,
    })
  },

  onLoad({ id }) {
    this.getHouseDetail(id)
  },

  async getHouseDetail(id) {
    const { code, data } = await wx.http.get('/room/' + id)
    if (code !== 10000) return wx.utils.toast()
    console.log(data);
    this.setData({
      ...data
      // 相当于将所有数据逐个赋值
      // id: data.id,
      // point: data.point,
      // ......
    })
  }
})
